const loaderUtils = require("loader-utils");

module.exports = function (sourceCode) {
  console.log("test-loader运行了");
  const options = loaderUtils.getOptions(this);
  const reg = new RegExp(options.changeVar, "g");
  return sourceCode.replace(reg, "var");
};
